package models

import "gorm.io/gorm"

type Shop struct {
	gorm.Model
	Name  string  `json:"name" gorm:"varchar(30)"`
	Price float64 `json:"price" gorm:"decimal(10,2)"`
	Intro string  `json:"intro" gorm:"varchar(255)"`
}

func Add(shop *Shop) error {
	err = DB.Create(&shop).Error
	if err != nil {
		return err
	} else {
		return nil
	}
}
